package com.spring.component.config;

import com.spring.component.demo.DemoG;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

import javax.annotation.Resource;


@Configuration
@ComponentScan("com.spring.component.demo")
public class DemoConfig {
    @Resource
    private DemoG dg;

    public DemoConfig(){
        System.out.println("我这个类DemoConfig被产生了!");
    }

    public void print(){
        dg.print();
    }
}
